#include"udpserver.hpp"
#include"comm.hpp"
#include<memory>

void usage(std::string proc)
{
    std::cout << "usage:\n\t" <<proc <<"local_ip local_port\n" <<std::endl;
}
int main(int argc,char *argv[])
{
    if(argc !=3)
    {
        usage(argv[0]);
        return usag_err;
    }
    std::string ip = argv[1];
    uint16_t port = std::stoi(argv[2]);
    std::unique_ptr<udpserver> usvr = std::make_unique<udpserver>(ip,port);
    usvr->init();
    usvr->start();
}